# coding: utf-8

class Stack(object):
    def __init__(self):
        self.items = []

    def push(self, item):
        self.items.append(item)

    def pop(self):
        return self.items.pop()

    def peek(self):
        """
        返回栈顶元素，但是不删除它
        :return:
        """
        return self.items[-1]

    def is_empty(self):
        return self.items == []

    def size(self):
        return len(self.items)
